package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.dagger.scope.FragmentScope;
import com.wgts.wgts.mvp.model.IMyOrderFragmentModel;
import com.wgts.wgts.mvp.model.imp.MyOrderFragmentModel;
import com.wgts.wgts.mvp.presenter.IMyOrderFragmentPersenter;
import com.wgts.wgts.mvp.presenter.imp.MyOrderFragmentPersenter;
import com.wgts.wgts.mvp.view.IMyOrderFragmentView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.netmodle.NetWorkFactory;
import com.wgts.wgts.tools.CountDownTime;

import dagger.Module;
import dagger.Provides;

@Module
public class MyOrderFragmentModule {

    private IMyOrderFragmentView view;

    public MyOrderFragmentModule(IMyOrderFragmentView view) {
        this.view = view;
    }

    @FragmentScope
    @Provides
    public IMyOrderFragmentView provideView(){
        return view;
    }

    @FragmentScope
    @Provides
    public IMyOrderFragmentModel provideModel(NetService netService){
        return new MyOrderFragmentModel(netService);
    }

    @FragmentScope
    @Provides
    public IMyOrderFragmentPersenter providePersenter(IMyOrderFragmentView view, IMyOrderFragmentModel model){
        return new MyOrderFragmentPersenter(view, model);
    }

}
